﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Chromatics.Resources;
using System.Windows.Resources;
using System.Windows.Media;

namespace Chromatics
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void load()
        {
            
            SystemTray.IsVisible = true;
            SystemTray.ProgressIndicator = new ProgressIndicator();
            SystemTray.ProgressIndicator.IsIndeterminate = true;
            SystemTray.ProgressIndicator.IsVisible = true;

            DataLoader.Instance.LevelsCount(Difficulty.Easy);

            SystemTray.ProgressIndicator.IsVisible = false;
        }

        private void PlayBtn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            SoundPlayer.PlayDing();
            NavigationService.Navigate(new Uri("/Pages/LevelChoosePage.xaml", System.UriKind.Relative));
        }

        private void SettingsBtn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            SoundPlayer.PlayDing();
            NavigationService.Navigate(new Uri("/Pages/SettingsPage.xaml", System.UriKind.Relative));
        }

        private void HelpBtn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            SoundPlayer.PlayDing();
            NavigationService.Navigate(new Uri("/Pages/HelpPage.xaml", System.UriKind.Relative));
        }

        private void AboutBtn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            SoundPlayer.PlayDing();
            NavigationService.Navigate(new Uri("/Pages/AboutPage.xaml", System.UriKind.Relative));
        }

    }
}